package it.isa.demo.mapper;

import it.isa.demo.entity.JpaBook;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author Corgile
 * @date 2022-02-27
 * Integer是Book类的id类型
 */
public interface JpaBookMapper extends JpaRepository<JpaBook, Integer> {
	JpaBook findJpaBookByBookId(Integer id);

	JpaBook removeJpaBookByBookId(Integer id);

	List<JpaBook> findByBookIdGreaterThanAndBookIdLessThan(Integer l, Integer r);

	@Override
	List<JpaBook> findAll();

	List<JpaBook> findByNameContains(String token);

}
